home *** CD-ROM | disk | FTP | other *** search
- /*
- IC Call Glue.c
-
- Code to call the IC component.
-
- The glue comes in two forms, PPC only and PPC/68k glue.
-
- The PPC/68k glue provides the ICStart and ICStop routines for starting
- and stopping the IC Component.
-
- The PPC glue provides the PPC code for the component interface (see note below).
-
- Important Note:
-
- This information (probably ;-) was derived by examining the tech note
- "QT 05 - Component Manager version 3.0" which describes in detail how
- to call a component from PPC code. Before modifying any of this code,
- you should take a look at that tech note.
-
- The author of this code was not mentioned before I (dhn) modified it. Whoever
- it is deserves most of the credit.
- */
-
- #include <Types.h>
- #include <MixedMode.h>
- #include <Components.h>
-
- #include "IC Types.h"
- #include "IC Component API.h"
-
- /*
- ICCStart
-
- Routine to initialize the IC component. Will ensure the component manager
- is available, open a default instance of the IC component, and start it up.
- */
- pascal ICError ICCStart(internetConfigurationComponent *inst, OSType creator){
- ICError err,junk;
- long response;
-
- *inst=(internetConfigurationComponent)0;
-
- if (Gestalt(gestaltComponentMgr,&response)==noErr){
- *inst=(internetConfigurationComponent)OpenDefaultComponent(internetConfigurationComponentType,internetConfigurationComponentSubType);
- }
-
- if (*inst==(internetConfigurationComponent)0){
- return badComponentInstance;
- } else {
- err=ICCStartComponent(*inst,creator);
-
- if (err!=noErr){
- junk=CloseComponent((ComponentInstance)*inst);
- *inst=(internetConfigurationComponent)0;
- }
- }
-
- return err;
- }
-
- /*
- ICCStop
-
- Shuts down the IC component then closes it completely.
- */
- pascal ICError ICCStop(internetConfigurationComponent inst){
- ICError err,err2;
-
- err=ICCStopComponent(inst);
- err2=CloseComponent((ComponentInstance)inst);
-
- if (err==noErr)
- err=err2;
-
- return err;
- }
-
- /*
- Only include the following code if we are compiling for the PPC!
- */
- #if defined(powerc) || defined (__powerc)
-
- enum {
- uppCallComponentProcInfo = kPascalStackBased
- | RESULT_SIZE(kFourByteCode)
- | STACK_ROUTINE_PARAMETER(1, kFourByteCode)
- };
-
- /*
- For an explanation of the inner workings of the following macros,
- see the ICCFindConfigFile() function.
- */
-
- /* A few macros to simplify the code (or does it make it more complex? ;-) */
- #define CallComponentGlue(ptr) \
- CallUniversalProc(CallComponentUPP,uppCallComponentProcInfo,(ptr))
-
- #define PPC_Glue(parmsType) \
- unsigned char flags; \
- unsigned char size; \
- short what; \
- parmsType parms; \
- internetConfigurationComponent inst
-
- #define SetupGlue(var,sel,type,ic)\
- (var).flags=0;\
- (var).size=sizeof(type);\
- (var).what=(sel);\
- (var).inst=(ic)
-
- #define PPC_VoidGlue \
- unsigned char flags; \
- unsigned char size; \
- short what; \
- internetConfigurationComponent inst
-
- #define SetupVoidGlue(var,sel,ic)\
- (var).flags=0;\
- (var).size=0;\
- (var).what=(sel);\
- (var).inst=(ic)
-
- #define SetGlueParm(var,ps,val) \
- (var).parms.ps=(val)
-
- /*
- NOTE:
-
- For the PPC glue to work, the structures must be padded for 68k stacks.
-
- This means that everything must be padded on a word boundary.
-
- For types that are of odd number of bytes (i.e. char), you must add a
- filler character after the type to pad it to a word.
-
- The list of types that need padding from the IC Types.h file are:
-
- (Booleans, chars, unsigned chars, ...)
- ICPerm
- */
-
- /*
- ICCStartComponent
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCStartComponent(internetConfigurationComponent inst, OSType creator){
- ICError junk;
- ICError err;
-
- #pragma options align=mac68k
- struct GlueParms {
- OSType creator;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- if (inst==(internetConfigurationComponent)0) {
- err = badComponentInstance;
- } else {
- SetupGlue(glue,kICCStart,GlueParms,inst);
-
- SetGlueParm(glue,creator,creator);
-
- err = CallComponentGlue(&glue);
- }
-
- return err;
- }
-
- /*
- ICCStopComponent
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCStopComponent(internetConfigurationComponent inst){
- ICError err;
-
- #pragma options align=mac68k
- struct ICCallGlue {
- PPC_VoidGlue;
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupVoidGlue(glue,kICCStop,inst);
-
- err=CallComponentGlue(&glue);
-
- return err;
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCFindConfigFile(internetConfigurationComponent inst, short count, ICDirSpecArrayPtr folders){
-
- #pragma options align=mac68k
- /*
- For each of the glue routines, the GlueParms structure is defined. It contains all of the parameters
- required to call the component while passing the correct parameters.
-
- Note that the elements are listed in the reverse order of the parameters
- */
- struct GlueParms {
- ICDirSpecArrayPtr folders;
- short count;
- };
-
- typedef struct GlueParms GlueParms;
-
- /*
- Then the ICCallGlue structure is defined using the GlueParms structure to ensure the size
- of the structure is set up correctly.
- */
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- // A single variable named 'glue' is defined using the ICCallGlue type
- ICCallGlue glue;
-
- // The glue variable is initialized using the selector, type, and instance of the component.
- SetupGlue(glue,kICCFindConfigFile,GlueParms,inst);
-
- // Any parameters in the GlueParms structure are initialized
- SetGlueParm(glue,folders,folders);
- SetGlueParm(glue,count,count);
-
- // Call the componen UPP using a pointer to the glue variable.
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCFindUserConfigFile(internetConfigurationComponent inst, ICDirSpec *where){
- #pragma options align=mac68k
- struct GlueParms {
- ICDirSpec* where;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCFindUserConfigFile,GlueParms,inst);
-
- SetGlueParm(glue,where,where);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCGeneralFindConfigFile(internetConfigurationComponent inst, Boolean search_prefs, Boolean can_create,
- short count, ICDirSpecArrayPtr folders){
- #pragma options align=mac68k
- struct GlueParms {
- ICDirSpecArrayPtr folders;
- short count;
- Boolean can_create;
- char filler1;
- Boolean search_prefs;
- char filler0;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCGeneralFindConfigFile,GlueParms,inst);
-
- SetGlueParm(glue,search_prefs,search_prefs);
- SetGlueParm(glue,filler1,0);
- SetGlueParm(glue,filler0,0);
- SetGlueParm(glue,can_create,can_create);
- SetGlueParm(glue,count,count);
- SetGlueParm(glue,folders,folders);
-
- return CallComponentGlue(&glue);
- }
-
- /*
- ICCChoseConfig
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCChooseConfig(internetConfigurationComponent inst){
- ICError err;
-
- #pragma options align=mac68k
- struct ICCallGlue {
- PPC_VoidGlue;
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupVoidGlue(glue,kICCChooseConfig,inst);
-
- err=CallComponentGlue(&glue);
-
- return err;
- }
-
- /*
- ICCChoseNewConfig
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCChooseNewConfig(internetConfigurationComponent inst){
- ICError err;
-
- #pragma options align=mac68k
- struct ICCallGlue {
- PPC_VoidGlue;
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupVoidGlue(glue,kICCChooseNewConfig,inst);
-
- err=CallComponentGlue(&glue);
-
- return err;
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCGetConfigName(internetConfigurationComponent inst, Boolean longname,StringPtr name){
- #pragma options align=mac68k
- struct GlueParms {
- StringPtr name;
- Boolean longname;
- char filler;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCGetConfigName,GlueParms,inst);
-
- SetGlueParm(glue,name,((StringPtr)name));
- SetGlueParm(glue,longname,longname);
- SetGlueParm(glue,filler,0);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCGetConfigReference(internetConfigurationComponent inst, ICConfigRefHandle ref){
- #pragma options align=mac68k
- struct GlueParms {
- ICConfigRefHandle ref;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCGetConfigReference,GlueParms,inst);
-
- SetGlueParm(glue,ref,ref);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCSetConfigReference(internetConfigurationComponent inst, ICConfigRefHandle ref, long flags){
- #pragma options align=mac68k
- struct GlueParms {
- long flags;
- ICConfigRefHandle ref;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCSetConfigReference,GlueParms,inst);
-
- SetGlueParm(glue,flags,flags);
- SetGlueParm(glue,ref,ref);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCSpecifyConfigFile(internetConfigurationComponent inst, FSSpec *config){
- #pragma options align=mac68k
- struct GlueParms {
- FSSpec* config;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCSpecifyConfigFile,GlueParms,inst);
-
- SetGlueParm(glue,config,config);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCGetSeed(internetConfigurationComponent inst, long *seed){
- #pragma options align=mac68k
- struct GlueParms {
- long* seed;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCGetSeed,GlueParms,inst);
-
- SetGlueParm(glue,seed,seed);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCGetPerm(internetConfigurationComponent inst, ICPerm *perm){
- #pragma options align=mac68k
- struct GlueParms {
- ICPerm* perm;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCGetPerm,GlueParms,inst);
-
- SetGlueParm(glue,perm,perm);
-
- return CallComponentGlue(&glue);
-
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCBegin(internetConfigurationComponent inst, ICPerm perm){
- #pragma options align=mac68k
- struct GlueParms {
- ICPerm perm;
- char filler0;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCBegin,GlueParms,inst);
-
- SetGlueParm(glue,perm,perm);
- SetGlueParm(glue,filler0,0);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCGetPref(internetConfigurationComponent inst,StringPtr key, ICAttr *attr, Ptr buf, long *size){
- #pragma options align=mac68k
- struct GlueParms {
- long* size;
- Ptr buf;
- ICAttr* attr;
- StringPtr key;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCGetPref,GlueParms,inst);
-
- SetGlueParm(glue,size,size);
- SetGlueParm(glue,buf,buf);
- SetGlueParm(glue,attr,attr);
- SetGlueParm(glue,key,key);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCSetPref(internetConfigurationComponent inst,StringPtr key, ICAttr attr, Ptr buf, long size){
- #pragma options align=mac68k
- struct GlueParms {
- long size;
- Ptr buf;
- ICAttr attr;
- StringPtr key;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCSetPref,GlueParms,inst);
-
- SetGlueParm(glue,size,size);
- SetGlueParm(glue,buf,buf);
- SetGlueParm(glue,attr,attr);
- SetGlueParm(glue,key,key);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCFindPrefHandle(internetConfigurationComponent inst,StringPtr key, ICAttr *attr, Handle prefh){
- #pragma options align=mac68k
- struct GlueParms {
- Handle prefh;
- ICAttr* attr;
- StringPtr key;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCFindPrefHandle,GlueParms,inst);
-
- SetGlueParm(glue,attr,attr);
- SetGlueParm(glue,prefh,prefh);
- SetGlueParm(glue,key,key);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCGetPrefHandle(internetConfigurationComponent inst,StringPtr key, ICAttr *attr, Handle *prefh){
- #pragma options align=mac68k
- struct GlueParms {
- Handle* prefh;
- ICAttr* attr;
- StringPtr key;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCGetPrefHandle,GlueParms,inst);
-
- SetGlueParm(glue,attr,attr);
- SetGlueParm(glue,prefh,prefh);
- SetGlueParm(glue,key,key);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCSetPrefHandle(internetConfigurationComponent inst,StringPtr key, ICAttr attr, Handle prefh){
- #pragma options align=mac68k
- struct GlueParms {
- Handle prefh;
- ICAttr attr;
- StringPtr key;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCSetPrefHandle,GlueParms,inst);
-
- SetGlueParm(glue,attr,attr);
- SetGlueParm(glue,prefh,prefh);
- SetGlueParm(glue,key,key);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCCountPref(internetConfigurationComponent inst, long *count){
- #pragma options align=mac68k
- struct GlueParms {
- long* count;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCCountPref,GlueParms,inst);
-
- SetGlueParm(glue,count,count);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCGetIndPref(internetConfigurationComponent inst, long n,StringPtr key){
- #pragma options align=mac68k
- struct GlueParms {
- StringPtr key;
- long n;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCGetIndPref,GlueParms,inst);
-
- SetGlueParm(glue,key,key);
- SetGlueParm(glue,n,n);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCDeletePref(internetConfigurationComponent inst,StringPtr key){
- #pragma options align=mac68k
- struct GlueParms {
- StringPtr key;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCDeletePref,GlueParms,inst);
-
- SetGlueParm(glue,key,key);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCEnd(internetConfigurationComponent inst){
- #pragma options align=mac68k
- struct ICCallGlue {
- PPC_VoidGlue;
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupVoidGlue(glue,kICCEnd,inst);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCDefaultFileName(internetConfigurationComponent inst,StringPtr name){
- #pragma options align=mac68k
- struct GlueParms {
- StringPtr name;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCDefaultFileName,GlueParms,inst);
-
- SetGlueParm(glue,name,name);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCGetComponentInstance(internetConfigurationComponent inst, Ptr *component_inst){
- *component_inst = (Ptr)inst;
- return (ICError)noErr;
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCEditPreferences(internetConfigurationComponent inst,StringPtr key){
- #pragma options align=mac68k
- struct GlueParms {
- StringPtr key;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCEditPreferences,GlueParms,inst);
-
- SetGlueParm(glue,key,key);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCParseURL(internetConfigurationComponent inst,StringPtr hint, Ptr data, long len,
- long *selStart, long *selEnd, Handle url){
- #pragma options align=mac68k
- struct GlueParms {
- Handle url;
- long* selEnd;
- long* selStart;
- long len;
- Ptr data;
- StringPtr hint;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCParseURL,GlueParms,inst);
-
- SetGlueParm(glue,url,url);
- SetGlueParm(glue,selEnd,selEnd);
- SetGlueParm(glue,selStart,selStart);
- SetGlueParm(glue,len,len);
- SetGlueParm(glue,hint,hint);
- SetGlueParm(glue,data,data);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCLaunchURL(internetConfigurationComponent inst,StringPtr hint, Ptr data, long len,
- long *selStart, long *selEnd){
- #pragma options align=mac68k
- struct GlueParms {
- long* selEnd;
- long* selStart;
- long len;
- Ptr data;
- StringPtr hint;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCLaunchURL,GlueParms,inst);
-
- SetGlueParm(glue,selEnd,selEnd);
- SetGlueParm(glue,selStart,selStart);
- SetGlueParm(glue,len,len);
- SetGlueParm(glue,hint,hint);
- SetGlueParm(glue,data,data);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCMapFilename(internetConfigurationComponent inst,StringPtr filename, ICMapEntry *entry){
- #pragma options align=mac68k
- struct GlueParms {
- ICMapEntry* entry;
- StringPtr filename;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCMapFilename,GlueParms,inst);
-
- SetGlueParm(glue,entry,entry);
- SetGlueParm(glue,filename,filename);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCMapTypeCreator(internetConfigurationComponent inst, OSType fType, OSType fCreator,StringPtr filename,
- ICMapEntry *entry){
- #pragma options align=mac68k
- struct GlueParms {
- ICMapEntry* entry;
- StringPtr filename;
- OSType fCreator;
- OSType fType;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCMapTypeCreator,GlueParms,inst);
-
- SetGlueParm(glue,entry,entry);
- SetGlueParm(glue,fCreator,fCreator);
- SetGlueParm(glue,fType,fType);
- SetGlueParm(glue,filename,filename);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCMapEntriesFilename(internetConfigurationComponent inst, Handle entries,StringPtr filename, ICMapEntry *entry){
- #pragma options align=mac68k
- struct GlueParms {
- ICMapEntry* entry;
- StringPtr filename;
- Handle entries;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCMapEntriesFilename,GlueParms,inst);
-
- SetGlueParm(glue,entry,entry);
- SetGlueParm(glue,entries,entries);
- SetGlueParm(glue,filename,filename);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCMapEntriesTypeCreator(internetConfigurationComponent inst, Handle entries, OSType fType, OSType fCreator,
- StringPtr filename, ICMapEntry *entry){
- #pragma options align=mac68k
- struct GlueParms {
- ICMapEntry* entry;
- StringPtr filename;
- OSType fCreator;
- OSType fType;
- Handle entries;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCMapEntriesTypeCreator,GlueParms,inst);
-
- SetGlueParm(glue,entry,entry);
- SetGlueParm(glue,fCreator,fCreator);
- SetGlueParm(glue,entries,entries);
- SetGlueParm(glue,fType,fType);
- SetGlueParm(glue,filename,filename);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCCountMapEntries(internetConfigurationComponent inst, Handle entries, long *count){
- #pragma options align=mac68k
- struct GlueParms {
- long* count;
- Handle entries;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCCountMapEntries,GlueParms,inst);
-
- SetGlueParm(glue,count,count);
- SetGlueParm(glue,entries,entries);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCGetIndMapEntry(internetConfigurationComponent inst, Handle entries, long ndx, long *pos, ICMapEntry *entry){
- #pragma options align=mac68k
- struct GlueParms {
- ICMapEntry* entry;
- long* pos;
- long ndx;
- Handle entries;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCGetIndMapEntry,GlueParms,inst);
-
- SetGlueParm(glue,entry,entry);
- SetGlueParm(glue,pos,pos);
- SetGlueParm(glue,ndx,ndx);
- SetGlueParm(glue,entries,entries);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCGetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry){
- #pragma options align=mac68k
- struct GlueParms {
- ICMapEntry* entry;
- long pos;
- Handle entries;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCGetMapEntry,GlueParms,inst);
-
- SetGlueParm(glue,entry,entry);
- SetGlueParm(glue,pos,pos);
- SetGlueParm(glue,entries,entries);
-
- return CallComponentGlue(&glue);
-
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCSetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry){
- #pragma options align=mac68k
- struct GlueParms {
- ICMapEntry* entry;
- long pos;
- Handle entries;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCSetMapEntry,GlueParms,inst);
-
- SetGlueParm(glue,entry,entry);
- SetGlueParm(glue,pos,pos);
- SetGlueParm(glue,entries,entries);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCDeleteMapEntry(internetConfigurationComponent inst, Handle entries, long pos){
- #pragma options align=mac68k
- struct GlueParms {
- long pos;
- Handle entries;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCDeleteMapEntry,GlueParms,inst);
-
- SetGlueParm(glue,pos,pos);
- SetGlueParm(glue,entries,entries);
-
- return CallComponentGlue(&glue);
- }
-
- /*
-
- PPC glue to call the component with the correct selector.
- */
- pascal ICError ICCAddMapEntry(internetConfigurationComponent inst, Handle entries, ICMapEntry *entry){
- #pragma options align=mac68k
- struct GlueParms {
- ICMapEntry* entry;
- Handle entries;
- };
-
- typedef struct GlueParms GlueParms;
-
- struct ICCallGlue {
- PPC_Glue(GlueParms);
- };
-
- typedef struct ICCallGlue ICCallGlue;
- #pragma options align=reset
-
- ICCallGlue glue;
-
- SetupGlue(glue,kICCAddMapEntry,GlueParms,inst);
-
- SetGlueParm(glue,entry,entry);
- SetGlueParm(glue,entries,entries);
-
- return CallComponentGlue(&glue);
- }
-
- #endif /* USESROUTINEDESCRIPTORS */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-